package com.hy.core.coreCode2;

import lombok.Data;
import lombok.ToString;

import java.util.concurrent.Callable;
import java.util.concurrent.Future;

@Data
@ToString
public class RequestPromise implements Callable<RequestPromise> {

    private UserRequest request;
    private Result result;

    private Future<RequestPromise> future;

    public RequestPromise(UserRequest request, Result result) {
        this.request = request;
        this.result = result;
    }

    @Override
    public RequestPromise call() throws Exception {
        return this;
    }
}